package fashionshop.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.*;

@Embeddable
public class Historical implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@ManyToOne
	@JoinColumn(name="CreatedBy", nullable=true)
	private Employee createdBy;
	
	@Column(name="CreatedDate", nullable=false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createdDate;

	@ManyToOne
	@JoinColumn(name="UpdatedBy")
	private Employee updatedBy;
	
	@Column(name="UpdatedDate")
	@Temporal(TemporalType.TIMESTAMP)
	private Date updatedDate;
	
	@Column(name="IsDeleted")
	private boolean isDeleted;
	
	public Historical(){
		
	}

	public Historical(Employee createdBy, Date createdDate) {
		this.createdBy = createdBy;
		this.createdDate = createdDate;
		this.isDeleted = false;
	}

	public Employee getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(Employee createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public Employee getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(Employee updatedBy) {
		this.updatedBy = updatedBy;
	}

	public Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	public boolean isDeleted() {
		return isDeleted;
	}

	public void setDeleted(boolean isDeleted) {
		this.isDeleted = isDeleted;
	}

}
